Optimal. Leaf size=27 \[ i x-2 i e^{i a} \text {ArcTan}\left (e^{-i a} x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {4587, 381, 396,
209} \begin {gather*} i x-2 i e^{i a} \text {ArcTan}\left (e^{-i a} x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 381
Rule 396
Rule 4587
Rubi steps
\begin {align*} \int \tan (a+i \log (x)) \, dx &=\int \tan (a+i \log (x)) \, dx\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 42, normalized size = 1.56 \begin {gather*} i x-2 i \text {ArcTan}(x \cos (a)-i x \sin (a)) \cos (a)+2 \text {ArcTan}(x \cos (a)-i x \sin (a)) \sin (a) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 22, normalized size = 0.81
method | result | size |
risch | \(i x -2 i \arctan \left (x \,{\mathrm e}^{-i a}\right ) {\mathrm e}^{i a}\) | \(22\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 122 vs. \(2 (17) = 34\).
time = 0.52, size = 122, normalized size = 4.52 \begin {gather*} {\left (i \, \cos \left (a\right ) - \sin \left (a\right )\right )} \arctan \left (\frac {2 \, x \cos \left (a\right )}{x^{2} + \cos \left (a\right )^{2} - 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}, \frac {x^{2} - \cos \left (a\right )^{2} - \sin \left (a\right )^{2}}{x^{2} + \cos \left (a\right )^{2} - 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}\right ) - \frac {1}{2} \, {\left (\cos \left (a\right ) + i \, \sin \left (a\right )\right )} \log \left (\frac {x^{2} + \cos \left (a\right )^{2} + 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}{x^{2} + \cos \left (a\right )^{2} - 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}\right ) + i \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.48, size = 33, normalized size = 1.22 \begin {gather*} e^{\left (i \, a\right )} \log \left (x + i \, e^{\left (i \, a\right )}\right ) - e^{\left (i \, a\right )} \log \left (x - i \, e^{\left (i \, a\right )}\right ) + i \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.14, size = 27, normalized size = 1.00 \begin {gather*} i x + \left (- \log {\left (x - i e^{i a} \right )} + \log {\left (x + i e^{i a} \right )}\right ) e^{i a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 30, normalized size = 1.11 \begin {gather*} \frac {2 \, \arctan \left (\frac {i \, x}{\sqrt {-e^{\left (2 i \, a\right )}}}\right ) e^{\left (2 i \, a\right )}}{\sqrt {-e^{\left (2 i \, a\right )}}} + i \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.17, size = 25, normalized size = 0.93 \begin {gather*} x\,1{}\mathrm {i}-\sqrt {{\mathrm {e}}^{a\,2{}\mathrm {i}}}\,\mathrm {atan}\left (\frac {x}{\sqrt {{\mathrm {e}}^{a\,2{}\mathrm {i}}}}\right )\,2{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________